<?php
namespace App\Core;

trait JwtBaseTrait{
    
    protected $_jwtExpiredTime;
    
    /**
     * 读取jwt-token过期时间
     * @return mixed
     */
    public function getJwtExpiredTime(){
        if($this->_jwtExpiredTime === null){
            $this->setJwtExpiredTime(time() + 3600);
        }
        return $this->_jwtExpiredTime;
    }
    
    /**
     * 设置jwt-token过期时间
     * @param $expiredTime
     * @return $this
     */
    public function setJwtExpiredTime($expiredTime){
        $this->_jwtExpiredTime = $expiredTime;
        return $this;
    }
}